package com.app.micaihu.bean.news;

import android.view.View;
import android.widget.TextView;

import com.app.micaihu.R;
import com.app.micaihu.custom.view.CustomImageView;
import com.app.utils.util.image.LoadImageUtils;

/**
 * 游戏原生图片下载广告(适用于图库列表)可跳转内页
 * Created by linkai on 2016/2/10.
 */
public class ViewGameVideoFour{

    public View mContentView;

    public CustomImageView img;//显示的大图片
    public TextView title;//标题


    public ViewGameVideoFour(View contentView) {
        initView(contentView);
    }

    public void initView(View contentView) {
        mContentView = contentView;
        this.img = (CustomImageView) mContentView.findViewById(R.id.thumb);
        this.title = (TextView) mContentView.findViewById(R.id.item_public_title);
        mContentView.setTag(this);
    }

    /**
     * 加载数据
     * @param newsEntity
     */
    public void loadData(NewsEntity newsEntity){
        this.title.setText(newsEntity.getArticleTitle());
        if(newsEntity.getArticleThumb() !=null && newsEntity.getArticleThumb().length >= 1){
            LoadImageUtils.getInstance().loadImage(this.img, newsEntity.getArticleThumb()[0]);
        }
    }


}
